
package com.hulk.ratel.common.constant.enums;

/**
 * @author cmt
 * @E-mail:29572320@qq.com
 * @version Create on: 2017年4月27日 下午1:59:05 Class description
 */

public enum Week {

	MONDAY(1), TUESDAY(2), WEDNESDAY(3), THURSDAY(4), FRIDAY(5), SATURDAY(6), SUNDAY(7);
	private int value;

	private Week(int value) {
		this.value = value;
	}

	public int getValue() {
		return value;
	}
	
	public static Week getEnum(String name) {
		Week resultEnum = null;
		Week[] stautsAry = Week.values();
		for (int i = 0; i < stautsAry.length; i++) {
			if (stautsAry[i].name().equals(name)) {
				resultEnum = stautsAry[i];
				break;
			}
		}
		return resultEnum;
	}
	@Override
	public String toString() {
		return String.valueOf(this.value);
	}
}
